import Vue from 'vue'
import Router from 'vue-router'

const Goods = () => import('./views/goods/goods')
const Ratings = () => import('./views/ratings/ratings')
const Seller = () => import('./views/seller/seller')


Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect: '/goods'
    },
    {
      path: '/goods',
      name: 'Goods',
      component: Goods
    },
    {
      path: '/ratings',
      name: 'Ratings',
      component: Ratings
    },
    {
      path: '/seller',
      name: 'Seller',
      component: Seller
    },
    {
      path: '*',
      redirect: '/goods'
    }
  ]
})
